import request from '@/utils/request'
// 获取数据的接口
export const getDeptsApi = () => {
  return request.get('/company/department')
}

// 获取联系人数据的接口
export const getManagerAPI = () => {
  return request.get('/sys/user/simple')
}

// 新添部门的接口
export const addDeptAPI = (data) => {
  return request.post('/company/department', data)
}

// 获取回显部门的接口
export const getDepartmentDetailAPI = (id) => {
  return request.get(`/company/department/${id}`)
}

// 修改部门的接口

export const upDepartmentAPI = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}

// 调取删除部门的接口
export const delDepartmentAPI = (id) => {
  return request.delete(`/company/department/${id}`)
}
